/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.scene.mapper;

import com.koron.scene.bean.ReceiveApplyBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface LabourProAppMapper {

    /**
     *
     * 入库台账-导入 新增
     * @param incomingParams
     * @return
     */
    Integer insertBatchIncomingParam(@Param("incomingParams") List<Map> incomingParams);

    /**
     * 领用申请-单条记录查询
     * @param id
     * @return
     */
    Map queryReceiveApplyById(@Param("id") String id);

    /**
     * 根据 领用申请id 查询 申请物品
     * @param receiveApplyId 领用申请id
     * @return
     */
    List<Map> queryApplyItemsByReceApplyId(@Param("receiveApplyId") String receiveApplyId);

    /**
     * 领用申请-新增
     * @param bean
     * @return
     */
    Integer insertReceiveApply(ReceiveApplyBean bean);

    /**
     * 领用申请-修改
     * @param bean
     * @return
     */
    Integer updateReceiveApply(ReceiveApplyBean bean);

    /**
     * 新增 申请物品
     * @param applyItems
     * @return
     */
    Integer insertApplyItems(@Param("applyItems") List<Map> applyItems);

    /**
     * 根据 id 修改 领用申请 申请状态(0-草稿 1-审批中 2-已审批 3-已领用)
     * @param id
     * @param applyStatus 申请状态(0-草稿 1-审批中 2-已审批 3-已领用)
     * @return
     */
    Integer updateReceiveApplyToStatus(@Param("id") String id, @Param("applyStatus") String applyStatus);

}
